home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Apple WWDC 1996
/
WWDC96_1996 (CD).toast
/
Technology Materials
/
MacOS 8 Resources
/
Developer Tools
/
Mac OS 8 Interfaces & Libraries
/
Interfaces
/
AIncludes
/
PCI.a
< prev
next >
Wrap
Text File
|
1996-05-01
|
7KB
|
316 lines
;
; File: PCI.a
;
; Contains: PCI Bus Interfaces.
;
; Version: Technology: PowerSurge 1.0.2
; Release: Universal Interfaces 3.0d3 on Copland DR1
;
; Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
;
; Bugs?: If you find a problem with this file, send the file and version
; information (from above) and the problem description to:
;
; Internet: apple.bugs@applelink.apple.com
; AppleLink: APPLE.BUGS
;
;
IF &TYPE('__PCI__') = 'UNDEFINED' THEN
__PCI__ SET 1
IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
include 'Types.a'
ENDIF
IF &TYPE('__NAMEREGISTRY__') = 'UNDEFINED' THEN
include 'NameRegistry.a'
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE THEN
; Types and structures for accessing the PCI Assigned-Address property.
kPCIRelocatableSpace EQU $80
kPCIPrefetchableSpace EQU $40
kPCIAliasedSpace EQU $20
kPCIAddressTypeCodeMask EQU $03
kPCIConfigSpace EQU 0
kPCIIOSpace EQU 1
kPCI32BitMemorySpace EQU 2
kPCI64BitMemorySpace EQU 3
; typedef UInt8 PCIAddressSpaceFlags
kPCIDeviceNumberMask EQU $1F
kPCIFunctionNumberMask EQU $07
; typedef UInt8 PCIDeviceFunction
; typedef UInt8 PCIBusNumber
; typedef UInt8 PCIRegisterNumber
PCIAssignedAddress RECORD 0
addressSpaceFlags ds.b 1 ; offset: $0 (0)
busNumber ds.b 1 ; offset: $1 (1)
deviceFunctionNumber ds.b 1 ; offset: $2 (2)
registerNumber ds.b 1 ; offset: $3 (3)
address ds UnsignedWide ; offset: $4 (4)
size ds UnsignedWide ; offset: $C (12)
sizeof EQU * ; size: $14 (20)
ENDR
; typedef struct PCIAssignedAddress * PCIAssignedAddressPtr
IF ¨ GENERATINGCFM THEN
Macro
_EndianSwap32Bit &Dn
IF &Dn = '' THEN
ROL.W #8,D0
SWAP D0
ROL.W #8,D0
ELSE
ROL.W #8,&Dn
SWAP &Dn
ROL.W #8,&Dn
ENDIF
Endm
ELSE
IMPORT_CFM_FUNCTION EndianSwap32Bit
ENDIF
IF ¨ GENERATINGCFM THEN
Macro
_EndianSwap16Bit &Dn
IF &Dn = '' THEN
ROL.W #8,D0
ELSE
ROL.W #8,&Dn
ENDIF
Endm
ELSE
IMPORT_CFM_FUNCTION EndianSwap16Bit
ENDIF
ENDIF
IF FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED THEN
;
; pascal OSErr ExpMgrConfigReadByte(RegEntryIDPtr node, LogicalAddress configAddr, UInt8 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrConfigReadByte
move.w #$0620,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrConfigReadByte
ENDIF
;
; pascal OSErr ExpMgrConfigReadWord(RegEntryIDPtr node, LogicalAddress configAddr, UInt16 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrConfigReadWord
move.w #$0621,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrConfigReadWord
ENDIF
;
; pascal OSErr ExpMgrConfigReadLong(RegEntryIDPtr node, LogicalAddress configAddr, UInt32 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrConfigReadLong
move.w #$0622,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrConfigReadLong
ENDIF
;
; pascal OSErr ExpMgrConfigWriteByte(RegEntryIDPtr node, LogicalAddress configAddr, UInt8 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrConfigWriteByte
move.w #$0523,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrConfigWriteByte
ENDIF
;
; pascal OSErr ExpMgrConfigWriteWord(RegEntryIDPtr node, LogicalAddress configAddr, UInt16 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrConfigWriteWord
move.w #$0524,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrConfigWriteWord
ENDIF
;
; pascal OSErr ExpMgrConfigWriteLong(RegEntryIDPtr node, LogicalAddress configAddr, UInt32 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrConfigWriteLong
move.w #$0625,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrConfigWriteLong
ENDIF
;
; pascal OSErr ExpMgrIOReadByte(RegEntryIDPtr node, LogicalAddress ioAddr, UInt8 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrIOReadByte
move.w #$0626,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrIOReadByte
ENDIF
;
; pascal OSErr ExpMgrIOReadWord(RegEntryIDPtr node, LogicalAddress ioAddr, UInt16 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrIOReadWord
move.w #$0627,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrIOReadWord
ENDIF
;
; pascal OSErr ExpMgrIOReadLong(RegEntryIDPtr node, LogicalAddress ioAddr, UInt32 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrIOReadLong
move.w #$0628,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrIOReadLong
ENDIF
;
; pascal OSErr ExpMgrIOWriteByte(RegEntryIDPtr node, LogicalAddress ioAddr, UInt8 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrIOWriteByte
move.w #$0529,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrIOWriteByte
ENDIF
;
; pascal OSErr ExpMgrIOWriteWord(RegEntryIDPtr node, LogicalAddress ioAddr, UInt16 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrIOWriteWord
move.w #$052A,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrIOWriteWord
ENDIF
;
; pascal OSErr ExpMgrIOWriteLong(RegEntryIDPtr node, LogicalAddress ioAddr, UInt32 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrIOWriteLong
move.w #$062B,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrIOWriteLong
ENDIF
;
; pascal OSErr ExpMgrInterruptAcknowledgeReadByte(RegEntryIDPtr entry, UInt8 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrInterruptAcknowledgeReadByte
move.w #$0411,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrInterruptAcknowledgeReadByte
ENDIF
;
; pascal OSErr ExpMgrInterruptAcknowledgeReadWord(RegEntryIDPtr entry, UInt16 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrInterruptAcknowledgeReadWord
move.w #$0412,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrInterruptAcknowledgeReadWord
ENDIF
;
; pascal OSErr ExpMgrInterruptAcknowledgeReadLong(RegEntryIDPtr entry, UInt32 *valuePtr)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrInterruptAcknowledgeReadLong
move.w #$0413,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrInterruptAcknowledgeReadLong
ENDIF
;
; pascal OSErr ExpMgrSpecialCycleWriteLong(RegEntryIDPtr entry, UInt32 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrSpecialCycleWriteLong
move.w #$0419,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrSpecialCycleWriteLong
ENDIF
;
; pascal OSErr ExpMgrSpecialCycleBroadcastLong(UInt32 value)
;
IF ¨ GENERATINGCFM THEN
Macro
_ExpMgrSpecialCycleBroadcastLong
move.w #$021A,D0
dc.w $AAF3
EndM
ELSE
IMPORT_CFM_FUNCTION ExpMgrSpecialCycleBroadcastLong
ENDIF
ENDIF
ENDIF ; __PCI__